package com.app.service.impl.superarket;

import com.app.mapper.supermarket.MktPersonMapper;
import com.app.mapper.supermarket.MyOddMapper;
import com.app.model.supermarket.MktPersonModel;
import com.app.model.supermarket.MyOddModel;
import com.app.service.supermarket.MktPersonService;
import com.app.service.supermarket.MyOddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Description:零活
 * @Author: N
 * @Date: 2022年11月24日 10点29分
 */
@Service
@Primary
public class MyOddServiceImpl implements MyOddService {
    @Autowired
    MyOddMapper myOddMapper;


    @Override
    public void insert(MyOddModel model) {
        myOddMapper.insert(model);
    }

    @Override
    public void update(MyOddModel model) {
        myOddMapper.update(model);
    }

    @Override
    public void delete(int id) {
        myOddMapper.delete(id);
    }

    @Override
    public List<MyOddModel> getOddByMid(int mid, int state) {
        return myOddMapper.getOddByMid(mid,state);
    }

    @Override
    public int getCountByOid(int oid) {
        return myOddMapper.getCountByOid(oid);
    }

    @Override
    public int getCountByOidState(int oid) {
        return myOddMapper.getCountByOidState(oid);
    }

    @Override
    public int getCountByMid(int mid) {
        return myOddMapper.getCountByMid(mid);
    }

    @Override
    public int getCountByOidAndState(int oid) {
        return myOddMapper.getCountByOidAndState(oid);
    }

    @Override
    public List<MyOddModel> getMyOddMak(MyOddModel model) {
        return myOddMapper.getMyOddMak(model);
    }

    @Override
    public List<MyOddModel> getModelByPid(int mid, int oid) {
        return myOddMapper.getModelByPid(mid,oid);
    }

    @Override
    public MyOddModel getModelByMidAndOid(int mid, int oid) {
        return myOddMapper.getModelByMidAndOid(mid,oid);
    }

    @Override
    public int countMid(int mid) {
        return myOddMapper.countMid(mid);
    }
}
